package c.i.a.b;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class a {
    public static final Map<Class<?>, Class<?>> a;

    public static class a<T> {
    }

    static {
        HashMap hashMap = new HashMap();
        a = hashMap;
        Class cls = Boolean.TYPE;
        hashMap.put(Boolean.class, cls);
        hashMap.put(Byte.class, Byte.TYPE);
        hashMap.put(Character.class, Character.TYPE);
        hashMap.put(Short.class, Short.TYPE);
        Class cls2 = Integer.TYPE;
        hashMap.put(Integer.class, cls2);
        Class cls3 = Float.TYPE;
        hashMap.put(Float.class, cls3);
        Class cls4 = Long.TYPE;
        hashMap.put(Long.class, cls4);
        hashMap.put(Double.class, Double.TYPE);
        hashMap.put(cls, cls);
        Class cls5 = Byte.TYPE;
        hashMap.put(cls5, cls5);
        cls5 = Character.TYPE;
        hashMap.put(cls5, cls5);
        cls5 = Short.TYPE;
        hashMap.put(cls5, cls5);
        hashMap.put(cls2, cls2);
        hashMap.put(cls3, cls3);
        hashMap.put(cls4, cls4);
        cls5 = Double.TYPE;
        hashMap.put(cls5, cls5);
    }

    /* JADX WARNING: Removed duplicated region for block: B:42:0x0067 A:{SYNTHETIC} */
    /* JADX WARNING: Removed duplicated region for block: B:40:0x006b A:{SYNTHETIC, EDGE_INSN: B:40:0x006b->B:30:0x006b ?: BREAK  } */
    /* JADX WARNING: Removed duplicated region for block: B:40:0x006b A:{SYNTHETIC, EDGE_INSN: B:40:0x006b->B:30:0x006b ?: BREAK  } */
    /* JADX WARNING: Removed duplicated region for block: B:42:0x0067 A:{SYNTHETIC} */
    /* JADX WARNING: Missing block: B:9:0x0024, code skipped:
            if (r13.length != 0) goto L_0x005e;
     */
    /* JADX WARNING: Missing block: B:12:0x002a, code skipped:
            if (r6.length == 0) goto L_0x0063;
     */
    public static java.lang.reflect.Method a(java.lang.Class<?> r11, java.lang.String r12, java.lang.Class... r13) {
        /*
        r0 = r11.getDeclaredMethods();
        r1 = "Method name must not be null.";
        java.util.Objects.requireNonNull(r12, r1);
        r1 = r0.length;
        r2 = 0;
        r3 = 0;
    L_0x000c:
        r4 = 1;
        if (r3 >= r1) goto L_0x006a;
    L_0x000f:
        r5 = r0[r3];
        r6 = r5.getName();
        r6 = r6.equals(r12);
        if (r6 == 0) goto L_0x0067;
    L_0x001b:
        r6 = r5.getParameterTypes();
        if (r6 != 0) goto L_0x0027;
    L_0x0021:
        if (r13 == 0) goto L_0x0063;
    L_0x0023:
        r6 = r13.length;
        if (r6 != 0) goto L_0x005e;
    L_0x0026:
        goto L_0x0063;
    L_0x0027:
        if (r13 != 0) goto L_0x002d;
    L_0x0029:
        r6 = r6.length;
        if (r6 != 0) goto L_0x005e;
    L_0x002c:
        goto L_0x0063;
    L_0x002d:
        r7 = r6.length;
        r8 = r13.length;
        if (r7 == r8) goto L_0x0032;
    L_0x0031:
        goto L_0x005e;
    L_0x0032:
        r7 = 0;
    L_0x0033:
        r8 = r6.length;
        if (r7 >= r8) goto L_0x0063;
    L_0x0036:
        r8 = r6[r7];
        r9 = r13[r7];
        r8 = r8.isAssignableFrom(r9);
        if (r8 != 0) goto L_0x0060;
    L_0x0040:
        r8 = a;
        r9 = r6[r7];
        r9 = r8.containsKey(r9);
        if (r9 == 0) goto L_0x005e;
    L_0x004a:
        r9 = r6[r7];
        r9 = r8.get(r9);
        r9 = (java.lang.Class) r9;
        r10 = r13[r7];
        r8 = r8.get(r10);
        r8 = r9.equals(r8);
        if (r8 != 0) goto L_0x0060;
    L_0x005e:
        r6 = 0;
        goto L_0x0064;
    L_0x0060:
        r7 = r7 + 1;
        goto L_0x0033;
    L_0x0063:
        r6 = 1;
    L_0x0064:
        if (r6 == 0) goto L_0x0067;
    L_0x0066:
        goto L_0x006b;
    L_0x0067:
        r3 = r3 + 1;
        goto L_0x000c;
    L_0x006a:
        r5 = 0;
    L_0x006b:
        if (r5 != 0) goto L_0x0082;
    L_0x006d:
        r0 = r11.getSuperclass();
        if (r0 == 0) goto L_0x007c;
    L_0x0073:
        r11 = r11.getSuperclass();
        r11 = a(r11, r12, r13);
        return r11;
    L_0x007c:
        r11 = new java.lang.NoSuchMethodException;
        r11.<init>();
        throw r11;
    L_0x0082:
        r5.setAccessible(r4);
        return r5;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.i.a.b.a.a(java.lang.Class, java.lang.String, java.lang.Class[]):java.lang.reflect.Method");
    }

    public static void b(Class<?> cls, String str, Object... objArr) {
        Class[] clsArr;
        Object[] objArr2;
        if (objArr == null || objArr.length <= 0) {
            clsArr = null;
        } else {
            clsArr = new Class[objArr.length];
            for (int i = 0; i < objArr.length; i++) {
                Object obj = objArr[i];
                if (obj == null || !(obj instanceof a)) {
                    clsArr[i] = obj == null ? null : obj.getClass();
                } else {
                    a aVar = (a) obj;
                    clsArr[i] = null;
                }
            }
        }
        Method a = a(cls, str, clsArr);
        if (objArr == null || objArr.length <= 0) {
            objArr2 = null;
        } else {
            objArr2 = new Object[objArr.length];
            for (int i2 = 0; i2 < objArr.length; i2++) {
                Object obj2 = objArr[i2];
                if (obj2 == null || !(obj2 instanceof a)) {
                    objArr2[i2] = obj2;
                } else {
                    a aVar2 = (a) obj2;
                    objArr2[i2] = null;
                }
            }
        }
        a.invoke(null, objArr2);
    }
}
